package com.wbt.huawei;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;

/**
 * @program: Thread-demo
 * @description:
 * @author: Wang·Baotong
 * @create: 2021-03-10 15:55
 */
public class CountGames {
    public static void main(String[] args) throws IOException {
        BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
        String num;
        while ((num =  bf.readLine()) != null){
            int m = Integer.parseInt(num);
            if(m>1 && m<100){
                run(Integer.parseInt(num));
            }else {
                System.out.println("ERROR!");
            }

            bf.hashCode();

        }
    }

    private static void run(int m){
        List<String> numList = new ArrayList<>(100);
        for (int i=0;i<100;i++)
            numList.add(String.valueOf(i+1));
        int k = 0;
        int j = 1;
        while (numList.size() >= m){
            if (k > numList.size()-1) k=0;
            if(j==3){
                numList.remove(k);
                j=0;
                k--;
            }
            k++;
            j++;
        }
        System.out.println(String.join(",",numList));
    }
}
